<template>
    <div id="en">
        <h2>需求:输入框输入内容,将内容显示在p标签中</h2>
        <input type="text" @input="fn">
        <p>{{ result }}</p>

    </div>
</template>

<script>
    export default {
        name: "8-vue-v-on事件对象",
        data() {
            return {
                result: ''
            }
        },
        methods: {
            fn(e) {

                this.result = e.target.value
            }
        }
    }
</script>

<style scoped>

</style>